package com.hg.library.config;

import android.content.Context;

import com.eguan.monitor.EguanMonitorAgent;

import java.util.Map;

/**
 * Created by ASUS-PC on 2016/7/1.
 */
public class StatisticalData {
    private static StatisticalData ourInstance = new StatisticalData();

    public static StatisticalData getInstance() {
        return ourInstance;
    }

    private StatisticalData() {
    }

    public void init(Context context){
        EguanMonitorAgent.getInstance().initEguan (context,"f9a163bmfrentcxhb","null");
        EguanMonitorAgent.getInstance().setDebugMode(false);
    }

    public void onResume(){
        EguanMonitorAgent.getInstance().onResume();
    }

    public void onPause(){
        EguanMonitorAgent.getInstance().onPause();
    }

    /**
     * 如果要杀死进程，请提前调用改方法
     */
    public void onKillProcess(){
        EguanMonitorAgent.getInstance().onKillProcess();
    }

    /**
     * 页面信息接口
     * @param context
     * @param pageInfo
     */
    public void pageInfo(Context context, Map<String,String> pageInfo){
        EguanMonitorAgent.getInstance().pageInfo(context, pageInfo);
    }

    /**
     * 事件信息接口
     * @param context
     * @param eventInfo
     */
    public void eventInfo(Context context,Map<String,String> eventInfo){
        EguanMonitorAgent.getInstance().eventInfo(context, eventInfo);
    }

    /**
     * 上传接口
     * @param context
     * @param userId
     */
    public void upload(Context context, String userId){
        EguanMonitorAgent.getInstance().upload(context,userId);
    }


}
